STACK: LD A,<R> ; <R> is the value of R saved at NMI LD R, A LD A,<I> ; <I> is the value of I saved at NMI LD I, A LD HL,<AF'> ; <AF'> is the value of AF' saved at NMI PUSH HL LD HL,<AF> ; <AF> is the value of AF saved at NMI PUSH HL POP AF EX AF, AF' POP AF EX AF, AF' LD BC,<BC> ; <BC> is the value of BC saved at NMI LD DE,<DE> ; <DE> is the value of DE saved at NMI LD HL,<HL> ; <HL> is the value of HL saved at NMI LD SP,<SP>+2 ; <SP> is the value of SP saved at NMI LD IX,<IX> ; <IX> is the value of IX saved at NMI LD IY,<IY> ; <IY> is the value of IY saved at NMI EXX LD BC,<BC'> ; <BC'> is the value of BC' saved at NMI LD DE,<DE'> ; <DE'> is the value of DE' saved at NMI LD HL,<HL'> ; <HL'> is the value of HL' saved at NMI EXX EI/DI ; EI if (data+$1A)=$01, DI if (data+$1A)=$00 IM 1/2/3 ; determined by trial and error JP <PC> ; <PC> is the value of PC saved at NMI